<template>
  <div class="card-container">
    <span class="title">
      <!-- 社联要闻 -->
      <h4>社联要闻>></h4>
    </span>
    <hr />
    <div class="row row-cols-1 row-cols-md-3">
      <div class="col mb-4" v-for="item in njtsau" :key="item.title">
        <div class="card h-100">
          <router-link to="/developing">
            <img :src="item.path" class="card-img-top" alt="..." />
          </router-link>
          <div class="card-body">
            <h5 class="card-title">
              <router-link to="/developing">
                <span>|</span>
                {{item.title}}
              </router-link>
            </h5>
            <p class="card-text">{{item.desc}}</p>
          </div>
        </div>
      </div>
    </div>

    <br />
    <span class="title">
      <h4>社团风采>></h4>
    </span>
    <hr />
    <div class="row row-cols-1 row-cols-md-3">
      <div class="col mb-4" v-for="item in community" :key="item.title">
        <div class="card h-100">
          <router-link to="/developing">
            <img :src="item.path" class="card-img-top" alt="..." />
          </router-link>
          <div class="card-body">
            <h5 class="card-title">
              <router-link to="/developing">
                <span>|</span>
                {{item.title}}
              </router-link>
            </h5>
            <p class="card-text">{{item.desc}}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["njtsau", "community"],
  methods: {
    details() {
      this.$router.push({ path: "/developing" });
    }
  }
};
</script>

<style lang="scss" scoped>
.card-container {
  margin: auto;
  width: 70%;
  text-align: center;
  a {
    color: black;
  }
  a:hover {
    color: #2891c8;
    text-decoration: none;
  }
  .title {
    display: flex;
    justify-content: space-between;
  }
  span {
    color: #2891c8;
    font-weight: 800;
  }
  h4 {
    // padding-left: 37px;
    color: #2891c8;
    margin-bottom: -15px;
  }
  hr {
    width: 100%;
    border: 0;
    border-bottom: 2px solid #2891c8;
  }
}
</style>